{% extends "travel/base.dhtml" %}

{% block extrahead %}
  <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/comments/" />
{% endblock %}

{% block title %}Recent comments{% endblock %}

{% block content %}

  <div id="map_comments" style="overflow: scroll; width: 530px; height: 450px;">

    <h1>Recent comments</h1>

    <p>
      {% if has_previous %}
      <a href="?page={{ previous }}">Previous</a> |
      {% endif %}
      Page {{ page }} of {{ pages }}
      {% if has_next %}
      | <a href="?page={{ next }}">Next</a>
      {% endif %}
    </p>

    {% for comment in object_list %}
    <div class="comment" id="c{{ comment.id }}">
      <h3>
        <a href="{{ comment.get_absolute_url }}">
          <span class="author">
            {{ comment.person_name|escape }}
          </span>
          commented on 
          <span class="date">
            {{ comment.submit_date|date:"F j, Y" }} 
          </span>
          at {{ comment.submit_date|date:"P" }}
        </a>
      </h3>
      {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }}
    </div>
    {% endfor %}

    <p>{% if has_previous %}<a href="?page={{ previous }}">Previous</a> | {% endif %}
      Page {{ page }} of {{ pages }}
      {% if has_next %} | <a href="?page={{ next }}">Next</a>{% endif %}</p>

  </div>

{% endblock %}
